#include<stdio.h>

void print_arr(int arr[], int len)
{
	int i = 0;
	for (i = 0; i < len; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\n");
}

int cmp_int(const void* p1, const void* p2)
{
	if (*(int*)p1 > *(int*)p2)
	{
		return 1;
	}
	else if (*(int*)p1 == *(int*)p2)
	{
		return 0;
	}
	else
	{
		return -1;
	}
}

void rich1()
{
	int arr[] = {9,8,7,6,5,4,3,2,1,0};
	int len = sizeof(arr) / sizeof(arr[0]);
	int leng = sizeof(arr[0]);
    qsort(arr, len, leng,cmp_int);
	print_arr(arr, len);
}

int main()
{
	rich1();
	return 0;
}